home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VCM / VCM.MDB / VcmComponentContainer / 14_Cabinet / DBVIEWVW.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-18  |  2.5 KB  |  101 lines

  1. // DBViewVw.cpp : implementation of the CDBViewView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes and
  4. // Templates (MFC&T).
  5. // Copyright (C) 1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // MFC&T Reference and related electronic documentation provided
  10. // with the library.  See these sources for detailed information
  11. // regarding the MFC&T product.
  12. //
  13.  
  14. #include "stdafx.h"
  15. #include "DBViewer.h"
  16.  
  17. #include "DBDoc.h"
  18. #include "DBViewVw.h"
  19.  
  20. #ifdef _DEBUG
  21. #define new DEBUG_NEW
  22. #undef THIS_FILE
  23. static char THIS_FILE[] = __FILE__;
  24. #endif
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CDBViewView
  28.  
  29. IMPLEMENT_DYNCREATE(CDBViewView, CTreeView)
  30.  
  31. BEGIN_MESSAGE_MAP(CDBViewView, CTreeView)
  32.     //{{AFX_MSG_MAP(CDBViewView)
  33.         // NOTE - the ClassWizard will add and remove mapping macros here.
  34.         //    DO NOT EDIT what you see in these blocks of generated code!
  35.     //}}AFX_MSG_MAP
  36. END_MESSAGE_MAP()
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CDBViewView construction/destruction
  40.  
  41. CDBViewView::CDBViewView()
  42. {
  43.     // TODO: add construction code here
  44.  
  45. }
  46.  
  47. CDBViewView::~CDBViewView()
  48. {
  49. }
  50.  
  51. BOOL CDBViewView::PreCreateWindow(CREATESTRUCT& cs)
  52. {
  53.     // TODO: Modify the Window class or styles here by modifying
  54.     //  the CREATESTRUCT cs
  55.  
  56.     return CTreeView::PreCreateWindow(cs);
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CDBViewView drawing
  61.  
  62. void CDBViewView::OnDraw(CDC* pDC)
  63. {
  64.     CDBViewDoc* pDoc = GetDocument();
  65.     ASSERT_VALID(pDoc);
  66.  
  67.     // TODO: add draw code for native data here
  68. }
  69.  
  70. void CDBViewView::OnInitialUpdate()
  71. {
  72.     CTreeView::OnInitialUpdate();
  73.  
  74.     // TODO: You may populate your TreeView with items by directly accessing
  75.     //  its tree control through a call to GetTreeCtrl().
  76. }
  77.  
  78. /////////////////////////////////////////////////////////////////////////////
  79. // CDBViewView diagnostics
  80.  
  81. #ifdef _DEBUG
  82. void CDBViewView::AssertValid() const
  83. {
  84.     CTreeView::AssertValid();
  85. }
  86.  
  87. void CDBViewView::Dump(CDumpContext& dc) const
  88. {
  89.     CTreeView::Dump(dc);
  90. }
  91.  
  92. CDBViewDoc* CDBViewView::GetDocument() // non-debug version is inline
  93. {
  94.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDBViewDoc)));
  95.     return (CDBViewDoc*)m_pDocument;
  96. }
  97. #endif //_DEBUG
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100. // CDBViewView message handlers
  101.